<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<div class="center-block p5 modify-email">
	<div id="warnPhoneMessage" class="col-sm-12 text-error mb15"></div>
	<form role="form" class="form-horizontal p15 mt20">
		<!-- 更换手机号时输入原手机号，并且验证原手机号 -->
		<s:if test="#request.p_flag.equals('MODIFY')">
			 <div class="form-group mr10">
			      <label class="sr-only">手机</label>
			      <input type="text" id="phone" name="phone" class="form-control" placeholder="请输入手机号码" aria-describedby="basic-addon2" readonly="readonly" value="<s:property value="#request.p_phone"/>"/>
			 </div>
			 <div class="form-group p0">
				  <input class="btn btn-info no-right-radius w-50 m0 fl" type="button" id="phoneBtnBySMS" onclick="iSendEmailOrPhoneRomdon('phoneBtnBySMS','phone','warnPhoneMessage','verifyPhone')" value="短信验证码"/>
				  <input class="btn btn-warning no-left-radius w-50 m0 fl" type="button" id="phoneBtnByVoice" onclick="iSendEmailOrPhoneRomdon('phoneBtnByVoice','phone','warnPhoneMessage','verifyPhone')" value="语音验证码"/>
			 </div>
		</s:if>
				<!-- 未绑定手机的用户绑定手机，并且验证绑定的手机是否存在，如果存在给出提示框，并且不允许提交 -->
		<s:elseif test="#request.p_flag.equals('BINGDING')">
		     <div class="form-group mr10">
			      <label class="sr-only">手机</label>
			      <input type="text" id="phone" name="phone" class="form-control" placeholder="请输入常用手机号" aria-describedby="basic-addon2"/>
			 </div>
			 <div class="form-group p0">
				  <input class="btn btn-info no-right-radius w-50 m0 fl" type="button" id="phoneBtnBySMS" onclick="iSendEmailOrPhoneRomdon('phoneBtnBySMS','phone','warnPhoneMessage','verifyPhone','subBtnBindingPhone')" value="短信验证码"/>
				  <input class="btn btn-warning no-left-radius w-50 m0 fl" type="button" id="phoneBtnByVoice" onclick="iSendEmailOrPhoneRomdon('phoneBtnByVoice','phone','warnPhoneMessage','verifyPhone','subBtnBindingPhone')" value="语音验证码"/>
			 </div>
		</s:elseif>
				<!-- 修改手机的用户验证原手机后，输入要修改的手机号，同时验证修改的手机号是否存在，如果存在给出提示框，并且不允许提交 -->
		<s:else>
		     <div class="form-group mr10">
			      <label class="sr-only">手机</label>
			      <input type="text" id="phone" name="phone" class="form-control" placeholder="请输入常用手机号" aria-describedby="basic-addon2"/>
			 </div>
			 <div class="form-group p0">
				  <input class="btn btn-info no-right-radius w-50 m0 fl" type="button" id="phoneBtnBySMS" onclick="iSendEmailOrPhoneRomdon('phoneBtnBySMS','phone','warnPhoneMessage','verifyPhone','subBtnUpdatePhone')" value="短信验证码"/>
				  <input class="btn btn-warning no-left-radius w-50 m0 fl" type="button" id="phoneBtnByVoice" onclick="iSendEmailOrPhoneRomdon('phoneBtnByVoice','phone','warnPhoneMessage','verifyPhone','subBtnUpdatePhone')" value="语音验证码"/>
			 </div>
		</s:else>
		<div class="form-group">
			<label class="sr-only">验证码</label> <input type="text"
				class="form-control" id="securityCode" placeholder="请输入收到的验证码" />
		</div>
		<s:if test="#request.p_flag.equals('MODIFY')">
			<div class="form-group">
				<input type="button" class="btn btn-success"
					onclick="verifyPhone('phone','warnPhoneMessage','securityCode')"
					value="提交" />
			</div>
		</s:if>
		<s:elseif test="#request.p_flag.equals('BINGDING')">
			<div class="form-group">
				<input type="button" class="btn btn-success"
					onclick="modifyOrBindingPhone('phone','warnPhoneMessage','securityCode')"
					id="subBtnBindingPhone" value="提交" />
			</div>
		</s:elseif>
		<s:else>
			<div class="form-group">
				<input type="button" class="btn btn-success" onclick="modifyOrBindingPhone('phone','warnEmailMessage','securityCode')" id="subBtnUpdatePhone" value="提交" />
			</div>
		</s:else>
	</form>
</div>
